1

环境准备 centos7.2
1、yum install docker-ce.x86_64 -y
安装完后
执行
systemctl enable docker
2、替换docker镜像保存目录与日志

  1. systemctl restart docker
  2. vim /etc/docker/daemon.json

    {
    "registry-mirrors": ["https://registry.docker-cn.com"],
    "graph":"/data/tools/docker",
    "log-driver": "json-file",
      "log-opts": {
        "max-size": "10m"
      }
    }
    
  3. 如果存在/etc/sysconfig/docker 编辑内容:

    OPTIONS='--selinux-enabled  --signature-verification=false'

3、启动docker

systemctl daemon-reload
systemctl start docker

4、查看docker运行状态

systemctl status docker

5、安装docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

黑白灰0010
36 声望4 粉丝